<extend name="./Application/Admin/View/base.html" />
<block name="title"><title><?php echo C(APP_NAME);?>PC端管理</title></block>
<block name="stylesheets">
<link href="__PUBLIC__/assets/css/select2.css" rel="stylesheet">

</block>
<block name="stylecss">
<style type='text/css'>
    table tr td{
        width: 80%;
    }
    table tr th{
        width: 16%;
        text-align: center;
        vertical-align: middle!important;
    }
</style>
</block>
<block name="smallmenu">
<ul class="breadcrumb">
	<li>
		<i class="ace-icon fa fa-home home-icon"></i>
		<a href="{:U('Index/index')}">主页</a>
	</li>
    <li>
		<a href="{:U('Order/index')}">订单列表</a>
	</li>
	<li class="active">订单详情</li>
</ul><!-- /.breadcrumb -->

<!-- #section:basics/content.searchbox -->
<div class="nav-search" id="nav-search"></div><!-- /.nav-search -->
</block>
<block name="content">
<div class="row" style="margin:12px 0">
    <div class="col-xs-12"><span class="label label-success label-lg "> 客户信息 </span></div>
</div>
<table class="table table-striped table-bordered table-hover" >
    <tr>
        <th>订单编号</th>
        <td>{$order_arr.order_num}</td>
    </tr>
    <tr>
        <th>收货人</th>
        <td>{$order_arr.address_username}</td>
    </tr>
    <tr>
        <th>收货电话</th>
        <td>{$order_arr.address_userphone}</td>
    </tr>
    <tr>
        <th>收货地址</th>
        <td>{$order_arr.address_address}</td>
    </tr>
    <tr>
        <th>总价</th>
        <td>{$order_arr.order_totalprice}元</td>
    </tr>
    <tr>
        <th>付款状态</th>
        <td><?php if ($order_arr['order_paystatus'] == 1): ?>
        <span style="color:red">未付款</span>
        <?php elseif ($order_arr['order_paystatus'] == 2): ?>
        <span style="color:yellow">已付款未发货</span>
        <?php elseif ($order_arr['order_paystatus'] == 3): ?>
        <span style="color:green">已付款已发货</span>
        <?php endif ?></td>
    </tr>
    <tr>
        <th>快递公司</th>
        <td>{$order_arr.order_express_com}</td>
    </tr>
    <tr>
        <th>快递单号</th>
        <td>{$order_arr.order_express_no}</td>
    </tr>
    <tr>
        <th>MIDI ID</th>
        <td>{$order_arr.user_id|formatNO=6}</td>
    </tr>
    <tr>
        <th>真实姓名</th>
        <td>{$order_arr.user_name}</td>
    </tr>
    <tr>
        <th>联系电话</th>
        <td>{$order_arr.user_phone}</td>
    </tr>
    <tr>
        <th>订单生成时间</th>
        <td>{$order_arr.order_createtime|date="Y-m-d H:i",###}</td>
    </tr>
    <tr>
        <th>真实姓名</th>
        <td>{$order_arr.user_name}</td>
    </tr>
</table>

<?php foreach ($goods_arr as $k=>$v): ?>

    <div class="row" style="margin:12px 7px">
        <div class="col-xs-12"><span class="label label-pink label-lg arrowed "></i> 商品  {$v.goods_num}  详情</span></div>
    </div>
    <table class="table table-striped table-bordered table-hover" >
        <tr>
            <th>商品编号</th>
            <td>{$v.goods_num}</td>
        </tr>
        <tr>
            <th>商品名称</th>
            <td>{$v.goods_name}</td>
        </tr>
        <tr>
            <th>商品类型</th>
            <td><?php if ($v['goods_category'] == 1): ?>
            曲谱
            <?php elseif ($v['goods_category'] == 2): ?>
            教程
            <?php endif ?></td>
        </tr>
        <tr>
            <th>商品单价</th>
            <td>{$v.goods_price}元</td>
        </tr>
        <tr>
            <th>商品数量</th>
            <td>{$v.goods_quantity}件</td>
        </tr>
        <tr>
            <th>总价</th>
            <td><span style="color:green">{:template_multiply($v[goods_price],$v[goods_quantity])}元</span></td>
        </tr>
    </table>
<?php endforeach ?>

<div style="margin-top:20px">
<span class="btn btn-sm" onclick="location.href='{$_SERVER[HTTP_REFERER]}'">返回</span>
</div>
</block>
<block name="scripts">
<script src="__PUBLIC__/assets/js/select2.js"></script>
</block>
<block name="jscript">
<script script="text/javascript">
    $(function(){
        $('#menu_order').addClass('active open');
        $('#menu_order_list').addClass('active');
    });
</script>

</block>